/**
 * 
 */
package com.apinoo.users.dao;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.apinoo.users.domain.User;
import com.apinoo.users.dto.UserDTO;

/**
 * @author Alejandro Pino Oreamuno
 *
 */
@Transactional(propagation = Propagation.REQUIRED)
public interface UserDAO {

	public void addUser(UserDTO dto);
	public void updateUser(UserDTO dto);
	public void deleteUser(UserDTO dto);
	public List<UserDTO> getUsers(UserDTO dto);
	public int countUsers(UserDTO dto);
	public User getUserById(long id);
	public User getUserByUsername(String username);
	public User getUserByEmail(String email);
	public boolean validateUser(String username, String password);
	public boolean usernameExists(UserDTO dto);
	public boolean emailExists(UserDTO dto);
}
